import React, { Component } from 'react';

export function withSource(dataSourceModelName) {
  return function (WrapperdComponent) {
    return class HOC extends Component {
      render() {
        const newProps = {
          dataSource: dataSourceModelName
        };
        return <div>
          <WrapperdComponent {...this.props} {...newProps} />
        </div>
      }
    }
  }
}